feat: kiloclaw chat rework#9764
Open
catrielmuller wants to merge 7 commits intomainfrom
Open
Conversation
Contributor
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (2 files)
Reviewed by gpt-5.5-20260423 · 1,084,190 tokens |
chrarnoldus
approved these changes
May 1, 2026
kirillk
approved these changes
May 1, 2026
| const SUBPROTOCOL_PREFIX = "kilo.jwt." | ||
| const HANDSHAKE_TIMEOUT_MS = 10_000 | ||
| const PING_INTERVAL_MS = 15_000 | ||
|
|
Contributor
There was a problem hiding this comment.
it's a literal copy of this: https://github.com/Kilo-Org/kilocode/pull/9764/changes#diff-c08cc065af20e1b444424adc3db8135815cbb8f73891dbf6ddbf684c8500c6ec
is it intentional?
| try { | ||
| parsed = JSON.parse(data) | ||
| } catch { | ||
| return |
| setConnected(true) | ||
| setLoading(false) | ||
| } catch (err: any) { | ||
| } catch (err) { | ||
| const e = err as { message?: string; name?: string; code?: string; stack?: string } | ||
| log.error("connect failed", { |
Contributor
There was a problem hiding this comment.
nit: maybe add an instanceof guard for type safety
0d76566 to
f409705
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Migrate the KiloClaw chat from the Stream Chat SaaS to Kilo's own kilo-chat backend so both the VS Code panel and the CLI TUI match the web UX at app.kilo.ai/claw/kilo-chat: multiple conversations, reactions, typing indicators, edits/deletes, reply threading, and in-chat action approvals. This also removes the
stream-chatdependency (and its Bun patch) from bothkilo-vscodeandopencodepackages.Implementation
packages/kilo-gateway):kilo.claw.chatCredentialsnow returns{ token, expiresAt, kiloChatUrl, eventServiceUrl }instead of Stream credentials. The bearer is the user's existing Kilo JWT —kilo-chatandevent-serviceverify it directly, so no extra token mint is needed. URLs are read fromKILO_CHAT_URL/EVENT_SERVICE_URLenv vars with sensible defaults.packages/kilo-vscode/src/kiloclaw/): newKiloChatClient(HTTP),EventServiceClient(WebSocket with JWT-via-subprotocol auth, reconnect, resubscribe, heartbeat), andTokenManager(cached minting with cooldown).KiloClawProvideris the single source of truth — it owns conversations, active-conversation messages, typing, bot status, optimistic sends, and reaction/action reconciliation, and fans state out to the webview over a typed postMessage protocol.packages/kilo-vscode/webview-ui/kiloclaw/): newConversationList,MessageArea, and expandedMessageBubble(reactions, edit/delete, reply preview, action approvals, toolbar), plus sidebar context-window meter and bot-status section. i18n strings added for all locales.packages/opencode/src/kilocode/claw/): ported to the same backend with a single-conversation view, slash commands (/new,/conversations), autocomplete, and the same sidebar layout.packages/sdk/openapi.json(new response shape +botNameon status).stream-chat@9.38.0and its patch removed from both packages.Screenshots
How to Test
bun run extension --no-build(orbun run extension) to launch the extension against a dev backend, open the KiloClaw panel, and verify:/new, rename, and leave work.bun run dev -- tui→ open the KiloClaw view:/conversationsopens the picker; selecting one loads its history./newcreates a fresh conversation and switches to it.